Recently, the integrated development environment (IDE) has become a mainstream tool for program design and development. As the complexity of program design languages continues to increase, a code assistance function is more widely applied in the IDE. A program developer may perform a subsequent input according to code assistance information. The code assistance function can reduce a load of a program developer for memorizing a syntax rule and names of language elements, reduce a quantity of characters entered by the program developer and an error rate, and improve the program development efficiency.
Currently, during code assistance, first, names of all language elements are used as code assistance information and displayed to the program developer, and then, code assistance information filtering is performed according to contents entered by the program developer. However, most information in the code assistance information is not needed by the program developer. For example, in the structured query language (SQL), the program developer enters an INSERT statement, and a schematic diagram of a display interface of existing code assistance information is shown in FIG. 5, and when the program developer continues to enter “in”, a schematic diagram of a display interface of existing code assistance information obtained after filtering is shown in FIG. 6. Information in FIG. 5 and FIG. 6 is not needed by the program developer, and the program developer hardly chooses the information during an actual development process. Displaying of the information may cause interference to the program developer, leading to low precision of generated code assistance information. In addition, displaying of the unnecessary code assistance information may cause a waste of system resources.